//the helix engine base Object class

#ifndef _HELIX_OBJECT_H_
#define _HELIX_OBJECT_H_

#include "Helix.h"
#include "Log.h"

namespace helix		//Put this in the helix namespace
{

	class MY_CLASS HObject
	{
	protected:
		static Log logFile;				//static log object so that every class can use the same one
										//must be initialized somewhere in the main file
		int numRefs;					//the number of objects linking to this object (used for garbage collection)

	public:
		static Log logger();			//returns the log

		HObject();						//constructor
		virtual ~HObject();             //virtual deconstructor
		virtual void Print();			//prints data to the log file
		virtual char* toString();		//prints data to a string

		void AddRef();					//add a reference to the object
		void SetRefs(int r);            //set the number of references to the object explicitly
		void DeleteRef();				//delete a reference to the object
		int GetRefCount();				//return the number of objects pointing at the object

		Log Log();						//returns the log file (must be globally defined)
		
	};

}  


#endif

